<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<style>
    .box {
        width: 200px;
        height: 200px;
        background: red;
    }
</style>
<body>
<div id="app">
    <h2>v-if 条件渲染</h2>
    <input v-model="seen" type="checkbox"> 勾选后显示红色小块

    <div v-if="seen" class="box"></div>

    <p v-else> 红块被隐藏</p>

    <h2>v-show 条件渲染</h2>
    <div v-show="seen" class="box">

    </div>
</div>

<script src="node_modules/vue/dist/vue.js">

</script>

<script>

    new Vue({
        el: '#app',
        data: {
            seen: false
        }
    });
</script>

</body>
</html>
